<?php

namespace app\admin\model;

use think\Model;


class CustomerDemand extends Model
{





    // 表名
    protected $name = 'customer_demand';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [
        'name'
    ];
    // 新增字段
    protected $type = [
        'width' => 'float',
        'length' => 'float',
        'unit' => 'string',
    ];

    // 关联产品
    public function product()
    {
        return $this->hasOne('ClothmakingProduct', 'id', 'product_id');
    }








}
